$("#form-customerAttendance-add").validate({
	rules:{
		cellphoneNum:{
			required:true,
		},
		salesUserId:{
			required:true,
		},
		attendanceTime:{
			required:true,
		}
	},
	submitHandler:function(form){
		add();
	}
});

function add() {
	var cellphone = $("input[name='cellphoneNum']").val();
	var myreg=/^[1][3,4,5,7,8][0-9]{9}$/; //手机号码
	if(!myreg.test(cellphone)){
		layer.msg('请输入正确的手机号码')
		return false
	}else{
		_ajax_save(ctx + "module/customerAttendance/save", $('#form-customerAttendance-add').serialize());
	}
}